package com.aaa.springboot.service.impl;

import com.aaa.springboot.dao.BookDao;
import com.aaa.springboot.pojo.Book;
import com.aaa.springboot.pojo.vo.BookVO;
import com.aaa.springboot.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class BookServiceImpl implements BookService {


    @Autowired
    private BookDao bookDao;



    @Override
    public int deleteByPrimaryKey(Integer id) {
        return bookDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Book record) {
        return bookDao.insert(record);
    }

    @Override
    public int insertSelective(Book record) {
        return bookDao.insertSelective(record);
    }

    @Override
    public Book selectByPrimaryKey(Integer id) {
        return bookDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Book record) {
        return bookDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Book record) {
        return bookDao.updateByPrimaryKey(record);
    }

    @Override
    public List<BookVO> selectAll(String bookname) {
        return bookDao.selectAll(bookname);
    }
}
